###############################################################################
#  Makefile.project.part.defines
###############################################################################
# MakeSupport type: AUTOSAR



#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# Root of the project (dir where the additionally used components reside) from the
# scope of the makefile location.
# E.g. makefile is located under
#    d:\usr\develop\can\PAG\HC08\COSMIC\testsuit\appl
# and the components like drv, il reside under
#    d:\usr\develop\can\PAG\HC08\COSMIC
# The root is given (relative to the Makefile)
#    ROOT = ..\..\..\..
#------------------------------------------------------------------------------
ROOT = ..\..\..\..
THIRDPARTY_ROOT = $(ROOT)\ThirdParty\BAC4_3\Supply\core


NANT_USED = 1
#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# $(GENTOOL_DIR) contains the path to your version.info file
# E.g.:    GENTOOL_DIR = $(ROOT)\Generators\Components
#------------------------------------------------------------------------------
GENTOOL_DIR = $(ROOT)\Generators\Components

#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# Version of Makefile.project.part.defines
#------------------------------------------------------------------------------
MPPD_VERSION = 32

#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# Path to which *.obj, *.err, *.lst will be moved/generated
#------------------------------------------------------------------------------
OBJ_PATH = obj
ERR_PATH = err
LST_PATH = lst
LOG_PATH = log
LIB_PATH = lib

#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# Redirect error output to stdout (and not only to *.err files)
#------------------------------------------------------------------------------
ERR_TO_STDOUT = 1

#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# $(GENDATA_DIR) contains the directory into which the ecu specific data is
# generated
# E.g.: GENDATA_DIR = GenData
#------------------------------------------------------------------------------
GENDATA_DIR = GenData

#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# $(GENDATA_OS_DIR) contains the directory into which the ecu osspecific data is
# generated
# E.g.: GENDATA_OS_DIR = GenDataOs
#------------------------------------------------------------------------------
GENDATA_OS_DIR = $(GENDATA_DIR)

#------------------------------------------------------------------------------
# Use Autosar Makefiles
#------------------------------------------------------------------------------
USE_AUTOSAR_MAKE = 1

#------------------------------------------------------------------------------
# Subfolder of BSW components (mandatory BSW with konStruct 1.7.xx or newer)
#------------------------------------------------------------------------------
GLOBAL_COMP_DIR = BSW

#------------------------------------------------------------------------------
# Subfolder of ASR software components# Relative to $(ROOT)\$(GLOBAL_COMP_DIR)
#------------------------------------------------------------------------------
GLOBAL_SWC_DIR = ..\SWC

#------------------------------------------------------------------------------
# Subfolder of Third Party components (e.g. Third Party MCAL)# Relative to $(ROOT)\$(GLOBAL_COMP_DIR)
#------------------------------------------------------------------------------
GLOBAL_THIRDPARTY_DIR = ..\ThirdParty


#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# Define usage of the generated RTE makefile
# $(RTE_MAKEFILE_DIR) contains the directory into which RTE makefile is generated
# Please note: If you are using RTE 4.11 or lower (MSR4 R15 and lower), the
# generated RTE makefile will not work with the Vector MakeSupport. Add the 
# RTE source files manually in this case and comment out RTE_MAKEFILE_DIR
#------------------------------------------------------------------------------
RTE_MAKEFILE_DIR = 

ifneq ($(RTE_MAKEFILE_DIR),)
include $(RTE_MAKEFILE_DIR)\Rte_rules.mak
include $(RTE_MAKEFILE_DIR)\Rte_defs.mak
include $(RTE_MAKEFILE_DIR)\Rte_check.mak
endif

#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# Define usage of the generated ComXf Transformer makefile
# $(COMXF_MAKEFILE_DIR) contains the directory into which ComXf Transformer makefile is generated
#------------------------------------------------------------------------------
COMXF_MAKEFILE_DIR = 

ifneq ($(COMXF_MAKEFILE_DIR),)
include $(COMXF_MAKEFILE_DIR)\ComXf_rules.mak
include $(COMXF_MAKEFILE_DIR)\ComXf_defs.mak
include $(COMXF_MAKEFILE_DIR)\ComXf_check.mak
endif

#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# Define usage of the generated E2eXf Transformer makefile
# $(E2EXF_MAKEFILE_DIR) contains the directory into which E2eXf Transformer makefile is generated
#------------------------------------------------------------------------------
E2EXF_MAKEFILE_DIR = 

ifneq ($(E2EXF_MAKEFILE_DIR),)
include $(E2EXF_MAKEFILE_DIR)\E2eXf_rules.mak
include $(E2EXF_MAKEFILE_DIR)\E2eXf_defs.mak
include $(E2EXF_MAKEFILE_DIR)\E2eXf_check.mak
endif

#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# $(TGFGENDATA_DIR) contains the directory into which the Test Generator
# Framework data is generated
# E.g.: TGFGENDATA_DIR = TGFGenData
#------------------------------------------------------------------------------
TGFGENDATA_DIR =

ifneq ($(TGFGENDATA_DIR),)
include $(TGFGENDATA_DIR)\Makefile.Appl
endif

#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# $(STARTAPPL_MAKE_USED) defines if the the StartApplication makefile shall be used
# $(STARTAPPLGENDATA_DIR) contains the folder of the makefile for the start application
# E.g.: STARTAPPLGENDATA_DIR = $(GENDATA_DIR)\mak
#------------------------------------------------------------------------------
STARTAPPL_MAKE_USED = 0
STARTAPPLGENDATA_DIR =

ifeq ($(STARTAPPL_MAKE_USED),1)
include $(STARTAPPLGENDATA_DIR)\Makefile.StartApplication
endif


#------------------------------------------------------------------------------
#------------------------- MUST be filled out ---------------------------------
# Define MCAL modules that shall be excluded from build
#------------------------------------------------------------------------------
MCAL_EXCLUDE_ADC   = 1
MCAL_EXCLUDE_DIO   = 1
MCAL_EXCLUDE_GPT   = 1
MCAL_EXCLUDE_ICU   = 1
MCAL_EXCLUDE_MCU   = 0
MCAL_EXCLUDE_PORT  = 1
MCAL_EXCLUDE_PWM   = 1
MCAL_EXCLUDE_SPI   = 1
MCAL_EXCLUDE_WDG   = 1
MCAL_EXCLUDE_FLS   = 1
MCAL_EXCLUDE_FEE   = 1
MCAL_EXCLUDE_EEP    = 1
MCAL_EXCLUDE_CRY   = 1
MCAL_EXCLUDE_SAFETY = 1
MCAL_EXCLUDE_FLSTST = 1
MCAL_EXCLUDE_RAMTST = 1
MCAL_EXCLUDE_CORTST = 1

E2E_USE_PROFIL1=1
E2E_USE_PROFIL2=0
E2E_USE_PROFIL4=0
E2E_USE_PROFIL5=0
E2E_USE_PROFIL6=0
E2E_USE_PROFIL7=0
E2E_USE_PROFILJLR=0

###############################################################################
#  Modules
###############################################################################
MODULE_LIST_PROJECT += CCL_ASR4COMMCFG5
MODULE_LIST_PROJECT += CCL_ASR4SMFR
MODULE_LIST_PROJECT += CP_ASR4XCP
MODULE_LIST_PROJECT += CP_XCPONFRASR
MODULE_LIST_PROJECT += DIAG_ASR4DCM
MODULE_LIST_PROJECT += DIAG_ASR4DEM
MODULE_LIST_PROJECT += DRVFR_XERAYASR
MODULE_LIST_PROJECT += DRVTRANS_TJA1082FRDIOSPIASR
MODULE_LIST_PROJECT += ECUAB_ASRIOHWAB
MODULE_LIST_PROJECT += GW_ASRPDURCFG5
MODULE_LIST_PROJECT += IF_ASR4IFWD
MODULE_LIST_PROJECT += IF_ASRIFCRY
MODULE_LIST_PROJECT += IF_ASRIFFEESMALLSECTOR
MODULE_LIST_PROJECT += IF_ASRIFFR
MODULE_LIST_PROJECT += IF_ASRIFMEM
MODULE_LIST_PROJECT += IL_ASRCOMCFG5
MODULE_LIST_PROJECT += IL_ASRIPDUMCFG5
MODULE_LIST_PROJECT += IL_ASRSECOC
MODULE_LIST_PROJECT += MCAL_RH850P1XREN03ASR4SUB
MODULE_LIST_PROJECT += MEMSERVICE_ASRNVM
MODULE_LIST_PROJECT += OS_PLATFORMRH850GEN7
MODULE_LIST_PROJECT += SECURITY_ASRCSM
MODULE_LIST_PROJECT += SYSSERVICE_ASR4BSWMCFG5
MODULE_LIST_PROJECT += SYSSERVICE_ASR4ECUM
MODULE_LIST_PROJECT += SYSSERVICE_ASR4WDM
MODULE_LIST_PROJECT += SYSSERVICE_ASRCRC
MODULE_LIST_PROJECT += SYSSERVICE_ASRDET
MODULE_LIST_PROJECT += SYSSERVICE_E2ELIB
MODULE_LIST_PROJECT += TP_ISO10681
MODULE_LIST_PROJECT += VSTDLIB


CCL_ASR4COMMCFG5_USED                                            = 0
CCL_ASR4SMFR_USED                                                = 0
CP_ASR4XCP_USED                                                  = 0
CP_XCPONFRASR_USED                                               = 0
DIAG_ASR4DCM_USED                                                = 0
DIAG_ASR4DEM_USED                                                = 0
DRVFR_XERAYASR_USED                                              = 0
DRVTRANS_TJA1082FRDIOSPIASR_USED                                 = 0
ECUAB_ASRIOHWAB_USED                                             = 0
GW_ASRPDURCFG5_USED                                              = 0
IF_ASR4IFWD_USED                                                 = 0
IF_ASRIFCRY_USED                                                 = 0
IF_ASRIFFEESMALLSECTOR_USED                                      = 0
IF_ASRIFFR_USED                                                  = 0
IF_ASRIFMEM_USED                                                 = 0
IL_ASRCOMCFG5_USED                                               = 0
MCAL_RH850P1XREN03ASR4SUB_USED                                   = 1
IL_ASRIPDUMCFG5_USED                                             = 0
IL_ASRSECOC_USED                                                 = 0
MEMSERVICE_ASRNVM_USED                                           = 0
OS_PLATFORMRH850GEN7_USED                                        = 0
SECURITY_ASRCSM_USED                                             = 0
SYSSERVICE_ASR4BSWMCFG5_USED                                     = 0
SYSSERVICE_ASR4ECUM_USED                                         = 0
SYSSERVICE_ASR4WDM_USED                                          = 0
SYSSERVICE_ASRCRC_USED                                           = 0
SYSSERVICE_ASRDET_USED                                           = 0
SYSSERVICE_E2ELIB_USED                                           = 0
TP_ISO10681_USED                                                 = 0
VSTDLIB_USED                                                     = 1


CCL_ASR4COMMCFG5_PATH                                            = BSW\ComM
CCL_ASR4SMFR_PATH                                                = BSW\FrSM
CP_ASR4XCP_PATH                                                  = BSW\Xcp
CP_XCPONFRASR_PATH                                               = BSW\FrXcp
DIAG_ASR4DCM_PATH                                                = BSW\Dcm
DIAG_ASR4DEM_PATH                                                = BSW\Dem
DRVFR_XERAYASR_PATH                                              = BSW\Fr
DRVTRANS_TJA1082FRDIOSPIASR_PATH                                 = BSW\FrTrcv_30_Tja1082
ECUAB_ASRIOHWAB_PATH                                             = BSW\IoHwAb
GW_ASRPDURCFG5_PATH                                              = BSW\PduR
IF_ASR4IFWD_PATH                                                 = BSW\WdgIf
IF_ASRIFCRY_PATH                                                 = BSW\CryIf
IF_ASRIFFEESMALLSECTOR_PATH                                      = BSW\Fee_30_SmallSector
IF_ASRIFFR_PATH                                                  = BSW\FrIf
IF_ASRIFMEM_PATH                                                 = BSW\MemIf
IL_ASRCOMCFG5_PATH                                               = BSW\Com
IL_ASRIPDUMCFG5_PATH                                             = BSW\IpduM
IL_ASRSECOC_PATH                                                 = BSW\SecOC
MCAL_RH850P1XREN03ASR4SUB_PATH                                   = BSW\Mcal_Rh850P1x
MEMSERVICE_ASRNVM_PATH                                           = BSW\NvM
OS_PLATFORMRH850GEN7_PATH                                        = BSW\Os
SECURITY_ASRCSM_PATH                                             = BSW\Csm
SYSSERVICE_ASR4BSWMCFG5_PATH                                     = BSW\BswM
SYSSERVICE_ASR4ECUM_PATH                                         = BSW\EcuM
SYSSERVICE_ASR4WDM_PATH                                          = BSW\WdgM
SYSSERVICE_ASRCRC_PATH                                           = BSW\Crc
SYSSERVICE_ASRDET_PATH                                           = BSW\Det
SYSSERVICE_E2ELIB_PATH                                           = BSW\E2E
TP_ISO10681_PATH                                                 = BSW\Tp_Iso10681
VSTDLIB_PATH                                                     = BSW\VStdLib


#DATA_SOURCE_LST += $(GENDATA_DIR)\v_par.c



###############################################################################
#  Application (Appl)
###############################################################################

############################## BLU sources ##################################
APP_SOURCE_LST += Source\startup.c       \
		  Source\Blu_UserAdapter.c \
		  Source\Blu_HardwareAdapter.c \
                  Source\main.c
		  



######################### Additional Include Paths ##########################
ADDITIONAL_INCLUDES += Include
ADDITIONAL_INCLUDES += $(GENDATA_DIR)\Components
ADDITIONAL_INCLUDES += ..\..\_Common
ADDITIONAL_INCLUDES += ..\..\_Common\Memmap
ADDITIONAL_INCLUDES += ..\..\_Common\Compiler_Cfg



###############################################################################
#  Bootloader Updater (BLU)				<BAC MODULES LIST FOR BLU>
###############################################################################


######################### Blu:classic ##########################
APP_SOURCE_LST += $(GENDATA_DIR)\Blu_StateFunctions.c
APP_SOURCE_LST += $(THIRDPARTY_ROOT)\Blu\classic\src\Blu.c
ADDITIONAL_INCLUDES += $(THIRDPARTY_ROOT)\Blu\classic\include

######################### Blu:classic:sample ##########################
#APP_SOURCE_LST += $(GENDATA_DIR)\Blu_StateFunctions.c
#APP_SOURCE_LST += $(THIRDPARTY_ROOT)\Blu\classic\src\Blu.c
ADDITIONAL_INCLUDES += $(THIRDPARTY_ROOT)\Blu\classic.sample\include





########################## BUtil:classic ###########################
#APP_SOURCE_LST += $(THIRDPARTY_ROOT)\BUtil\classic\src\BUtil_UDSAdapterHelper.c
ADDITIONAL_INCLUDES += $(THIRDPARTY_ROOT)\BUtil\classic\include
ADDITIONAL_INCLUDES += $(THIRDPARTY_ROOT)\BUtil\classic\include\BUtil

########################## BUtil:generic ###########################
APP_SOURCE_LST += $(THIRDPARTY_ROOT)\BUtil\generic\src\BUtil_AddressFormat.c
APP_SOURCE_LST += $(THIRDPARTY_ROOT)\BUtil\generic\src\BUtil_Math.c
ADDITIONAL_INCLUDES += $(THIRDPARTY_ROOT)\BUtil\generic\include
ADDITIONAL_INCLUDES += $(THIRDPARTY_ROOT)\BUtil\generic\src
#ADDITIONAL_INCLUDES += $(THIRDPARTY_ROOT)\BUtil\generic\include\BUtil


######################## Flash #########################
APP_SOURCE_LST += $(ROOT)\BSW\Flash\flash_if.c \
                  $(ROOT)\BSW\Flash\fbl_apfb.c \
                  $(ROOT)\BSW\Flash\fbl_flio.c \
                  $(ROOT)\BSW\Flash\flashrom.c \
                  $(ROOT)\BSW\Flash\fbl_apwd.c
ADDITIONAL_INCLUDES += $(ROOT)\Bsw\Flash

